
package org.ifi.xechecs.board;

public class Move {
	private Position from;
	private Position to;
	
	public Move(String sMove){
        from = new Position(sMove.substring(0, 2));
        to = new Position(sMove.substring(2, 4));				
	}
	
	public Move(Position from, Position to) {
		super();
		this.from = from;
		this.to = to;
	}

	public Move(byte f, byte t){		
		super();
		this.from = new Position(f);
		this.to = new Position(t);
	}

	public Position getFrom() {
		return from;
	}

	public void setFrom(Position from) {
		this.from = from;
	}

	public Position getTo() {
		return to;
	}

	public void setTo(Position to) {
		this.to = to;
	}
	@Override
	public String toString(){
		return from.toString() + to.toString();
	}
}
